package com.lanou3g.code0423.set;

import java.util.HashSet;
import java.util.Set;

/**
 * If there are no bugs, it was created by Chen FengYao on 2018/4/23;
 * Otherwise, I don't know who created it either
 */

public class Test03 {
    public static void main(String[] args) {
        Set<Integer> set = new HashSet<Integer>(){{
            // 在构造代码块中初始化数据
            add(1);
            add(2);
        }};
       show(set);
    }

    private static void show(Set<Integer> set){
        for (Integer integer : set) {
            System.out.println(integer);
        }
    }
}
